<layout name="../application/common/view/base.html" />
<link rel="stylesheet" href="/static/css/sweetalert.css">
    <!-- 数据表格 -->
    <div class="panel panel-default">
        <div class="panel-body">
            <script type="text/javascript">
                jQuery(document).ready(function()
                {
                    $("#example-4").dataTable({
                        dom: "<'row'<'col-sm-12 text-right'f >r>"+
                        "t"+
                        "<'row'<'col-xs-6'l><'col-xs-6 text-right'p>>",
                        "ordering":false,
                        "autoWidth": false,
                        language: {
                            "sProcessing": "处理中...",
                            "sLengthMenu": "显示 _MENU_ 项结果",
                            "sZeroRecords": "没有匹配结果",
                            "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                            "sInfoEmpty": "显示第 0 至 0 项结果，共 0 项",
                            "sInfoFiltered": "(由 _MAX_ 项结果过滤)",
                            "sInfoPostFix": "",
                            "sSearch": "Search:",
                            "searchPlaceholder": "请输入文字",
                            "sUrl": "",
                            "sEmptyTable": "表中数据为空",
                            "sLoadingRecords": "载入中...",
                            "sInfoThousands": ",",
                            "oPaginate": {
                                "sFirst": "首页",
                                "sPrevious": "上页",
                                "sNext": "下页",
                                "sLast": "末页"
                            },
                            "oAria": {
                                "sSortAscending": ": 以升序排列此列",
                                "sSortDescending": ": 以降序排列此列"
                            }
                        }

                    });

                    // Replace checkboxes when they appear
                    var $state = $("#example-4 thead input[type='checkbox']");

                    $("#example-4").on('draw.dt', function()
                    {
                        cbr_replace();

                        $state.trigger('change');
                    });

                    // Script to select all checkboxes
                    $state.on('change', function(ev)
                    {
                        var $chcks = $("#example-4 tbody input[type='checkbox']");

                        if($state.is(':checked'))
                        {
                            $chcks.prop('checked', true).trigger('change');
                        }
                        else
                        {
                            $chcks.prop('checked', false).trigger('change');
                        }
                    });
                });
            </script>
            <div class="row operating clearfix">
                    <!-- 下拉选择栏 -->
                <volist name="selects" id="selectdata">
                    <div class="selects col-sm-3">
                        <label class="control-label">{$selectdata.title}</label>
                        <script type="text/javascript">
                            jQuery(document).ready(function()
                            {
                                $("#{$selectdata.id}").selectBoxIt({
                                    showEffect: 'fadeIn',
                                    hideEffect: 'fadeOut'
                                });
                            });
                        </script>
                        <select class="form-control select-operate" select-key="{$selectdata.key}" id="{$selectdata.id}" select-url="{$selectdata.url}">
                            <option></option>
                            <volist name="selectdata.arrvalue" id="value" >
                                <if condition="$key eq $selectdata.selected ">
                                    <option value="{$key}" selected>{$value}</option>
                                <else />
                                <option value="{$key}">{$value}</option>
                                </if>
                            </volist>
                        </select>
                    </div>
                </volist>
                 <!-- 按钮工具栏 -->
                <div class="vertical-top text-right">
                    <if condition="checkAuth($request_url)">
                    <volist name="buttonList" id="buttondata">
                        <button class="{$buttondata.class}" button-url="{$buttondata.url}">{$buttondata.title}</button>
                    </volist>
                    </if>
                </div>
            </div>
           
            <table class="table table-bordered table-striped" id="example-4">
                <thead>
                <tr>
                    <th class="no-sorting">
                        <input type="checkbox" class="cbr">
                    </th>
                    <volist name="keyList" id="data">
                        <th>
                            {$data.title}
                            <if condition="$data.title eq ''">操作
                            </if>
                        </th>
                    </volist>
                </tr>
                </thead>

                <tbody>
                    <volist name="list" id="data">
                      <tr>
                          <td>
                          <input type="checkbox" class="cbr" value="{$data.id}">
                          </td>
                          <volist name="keyList" id="field">
                              <if condition="$field['name'] eq 'DOACTIONS'">
                              <td>
                                  <if condition="checkAuth($request_url)">
                                  <div class="row operate-center" >
                                      <volist name="doaction" id="operation">
                                          <include file="../application/admin/view/Builder/_keyListOperate.html" />
                                      </volist>
                                  </div>
                                  </if>
                              </td>
                                  <else />
                                  <include file="../application/admin/view/Builder/_keyList.html" />
                                  <!--<td style="width:auto};"  class="text-ellipsis">{$data[$field['name']]}</td>-->
                              </if>

                          </volist>
                      </tr>
                    </volist>
                </tbody>
                <tfoot>
                <th class="no-sorting">
                    <input type="checkbox" class="cbr">
                </th>
                <volist name="keyList" id="data">
                    <th>
                        {$data.title}
                        <if condition="$data.title eq ''">操作
                        </if>
                    </th>
                </volist>
                </tfoot>
            </table>
        </div>
    </div>

<script src="/static/js/datatables/js/jquery.dataTables.min.js"></script>
<script src="/static/js/datatables/dataTables.bootstrap.js"></script>
<script src="/static/js/datatables/yadcf/jquery.dataTables.yadcf.js"></script>
<script src="/static/js/datatables/tabletools/dataTables.tableTools.min.js"></script>
<script src="/static/js/jquery-ui/jquery-ui.min.js"></script>
<script src="/static/js/selectboxit/jquery.selectBoxIt.min.js"></script>
    <script src="/static/js/jquery.cookie.js"></script>
    <script src="/static/js/sweetalert.min.js"></script>


